package EWCore.Utilities
{
	public final class Range
	{
		
		public var m_Min:Number;
		public var m_Max:Number;
		
		public function Range(i_Num1:Number, i_Num2:Number)
		{
			if(i_Num1>i_Num2)
			{
				m_Min = i_Num1;
				m_Max = i_Num2;
			}
			else
			{
				m_Min = i_Num1;
				m_Max = i_Num2;
			}
		}
		public static function GetRange(i_Num1:Number, i_Num2:Number):Range
		{
			return new Range(i_Num1, i_Num2);
		}
		public function IsInRange(i_Num:Number)
		{
			return i_Num>=m_Min && i_Num<=m_Max;
		}
		public function toString():String
		{
			return "("+m_Min+" - "+m_Max+")";
		}
	}
}